import { Key } from 'react'

export interface XlDocumentPageQueryParams extends Partial<any> {
  ids?: Key[]
  searchText?: string
  parentId?: number
}

export interface XlDocumentTreeQueryParams {
  parentId?: number
}

export interface XlDocument {
  id: Key
  folderId?: number
  name?: string
  summary?: string
  content?: string
  createTime?: string
  modifyTime?: string
  seq?: number
}

export interface XlDocument_Summary {
  //主键
  id?: Key
  //名称
  name?: string
  description?: string
}

export interface XlDocument_TreeNode extends XlDocument {
  id: Key
  parentsId?: string[]
  parentsName?: string[]
  children?: XlDocument_TreeNode[]
}

export interface XlDocument_Create {
  icon?: string
  name: string
  content?: string
  parentId: number
  seq: number
}

export interface XlDocument_Modify extends XlDocument_Create {
  id: Key
}

export interface XlDocument_Patch extends Partial<XlDocument_Create> {
  id: Key
}
